﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace WaterWay.Utilities
{
     public class PubMethod
    {
        /// <summary>
        /// 判断输入的字符串是否是一个合法的手机号
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool IsMobilePhone(string input)
        {
            //电信手机号码正则        
            string dianxin = @"^1[3578][01379]\d{8}$";
            Regex dReg = new Regex(dianxin);
            //联通手机号正则        
            string liantong = @"^1[34578][01256]\d{8}$";
            Regex tReg = new Regex(liantong);
            //移动手机号正则        
            string yidong = @"^(134[012345678]\d{7}|1[34578][0123456789]\d{8})$";
            Regex yReg = new Regex(yidong);

            if (dReg.IsMatch(input) || tReg.IsMatch(input) || yReg.IsMatch(input))
            {
                return true;
            }
            else
                return false;

            //Regex regex = new Regex("^13\\d{9}$");
            //return regex.IsMatch(input);
        }

        public class Parame
        {
            public static string Default_Pwd = "123456"; //"E10ADC3949BA59ABBE56E057F20F883E";
            public static string Default_Admin = "1000";
            public static string Default_Admin_Pwd = "a123456";


            public static string ComplFirstCheckUserID = "";

            public static string Key_XZBM = "行政编码";
        }

    }
}
